<template>
	<el-config-provider :locale="locale">
		<router-view />
	</el-config-provider>
</template>
<script>
import {
	reactive,
	toRefs,
	defineComponent,
	computed
} from 'vue';
import {
	ElConfigProvider
} from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import en from 'element-plus/es/locale/lang/en'
import zhTw from 'element-plus/es/locale/lang/zh-tw'
import i18n from "@/i18n"
export default defineComponent({
	components: {
		[ElConfigProvider.name]: ElConfigProvider,
	},
	setup() {
		// let locale = zhCn;
		const state = reactive({});
		let langs = {
			zh: zhCn,
			en,
			hk: zhTw
		}
		let locale = computed(() => langs[i18n.global.locale])
		return {
			...toRefs(state),
			locale,
		};
	}
});
</script>
<style lang="scss">
@use '@/assets/font/iconfont.css';
//@use '@/assets/font/myIcon.css';
@use '@/styles/diy.scss';

* {
	margin: 0;
	padding: 0;
}
</style>